package cn.virde.example.javafx.listview;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;


public class ListViewExController{

    @FXML
    private ListView exListView;


    public void setString(ActionEvent event){
        ObservableList<String> list = FXCollections.observableArrayList();
        list.add("张三");
        list.add("李四");
        list.add("钱五");
        list.add("周六");
        exListView.setItems(list);
    }

    public void setLabel(ActionEvent event){
        ObservableList<Label> list = FXCollections.observableArrayList();
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhangSan \n Password:11213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:LiSi\n Password:323234234\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:QianWu\n Password:1122334313123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        list.add(new Label("Name:ZhouLiu\n Password:112342342213123\n这个是标题 \n 这个是是描述\n  email:sboneqiu@153.com\n  password:dsasdfasdf \n beiwang:哈哈哈哈哈哈"));
        exListView.setItems(list);
    }
}
